const { redisClient } = require('../../config/config.default')
const { path, port, options } = redisClient;
const Redis = require("ioredis");
const redis = new Redis(port, path, options);

redis.on("error", (err) => {
  if (err) {
    console.log("redis连接失败" + err);
  }
});
redis.on("ready", () => {
  console.log("redis连接成功,占用端口:" + port);
});

module.exports.redis = redis;
